package io.gitee.mojingjiao.day05;

import org.junit.Test;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;

public class TotalNums1 {
    public static final String Data="Teach Yourself Programming in Ten Years\n" +
            "Researchers (Bloom (1985), Bryan & Harter (1899), Hayes (1989),\n" +
            "Simmon & Chase (1973)) have shown it takes about ten years to\n" +
            "develop expertise in any of a wide variety of areas, including\n" +
            "chess playing, music composition, telegraph operation, painting,\n" +
            "piano playing, swimming, tennis, and research in neuropsychology\n" +
            "and topology. The key is deliberative practice: not just doing it\n" +
            "again and again, but challenging yourself with a task that is just\n" +
            "beyond your current ability, trying it, analyzing your performance\n" +
            "while and after doing it, and correcting any mistakes. Then repeat.\n" +
            "And repeat again. There appear to be no real shortcuts: even\n" +
            "Mozart, who was a musical prodigy at age 4, took 13 more years\n" +
            "before he began to produce world-class music. In another genre, the\n" +
            "Beatles seemed to burst onto the scene with a string of #1 hits and\n" +
            "an appearance on the Ed Sullivan show in 1964. But they had been\n" +
            "playing small clubs in Liverpool and Hamburg since 1957, and while\n" +
            "they had mass appeal early on, their first great critical success,\n" +
            "Sgt. Peppers, was released in 1967.";
    @Test
    public void test1(){
        String[] s0=Data.split("[., ]");
        Set<String>set=new HashSet<>();
        for(String e:s0){
            set.add(e);
        }
        System.out.println("不重复的单词共有："+set.size());
    }
}
